package com.infoland.afanmall.model.story.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.infoland.afanmall.R;
import com.infoland.afanmall.base.activity.GlideApp;
import com.infoland.afanmall.model.story.activity.StoryInfoActivity;

import java.util.List;

//翻拍适配器
public class ImageCardAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public ImageCardAdapter(int layoutResId, @Nullable List<String> data) {
        super(R.layout.story_card, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        GlideApp.with(helper.getView(R.id.card_image_view)).load(item).
                error(R.mipmap.lymr).into((ImageView) helper.getView(R.id.card_image_view));
    }

    @Override
    public long getItemId(int position) {
        return position;
    }
}